<?php 
	class testimonial_model extends CI_model{
		
		function get_testimonial($limit, $offset){
			$q = $this->db->query("SELECT * 
								   FROM
								   testimonial
								   WHERE status=1
								   ORDER BY date_update DESC LIMIT $offset, $limit");

			return $q->result();
		}

		function get_testimonial_rows(){
			$q = $this->db->query("SELECT * 
								   FROM
								   testimonial
								   WHERE status=1");

			return $q->num_rows();
		}

	}

?>